package com.quanyan.place.wrapper;

import com.quanyan.api.APIResponse;
import com.quanyan.common.Plugin.PageObj;
import com.quanyan.place.entity.TbBizPlaceMemberCard;
import com.quanyan.place.entity.TbBizPlaceOrder;
import com.quanyan.place.entity.apireq.*;
import com.quanyan.place.entity.apiresp.RespMemberCardInfo;
import com.quanyan.place.entity.apiresp.RespPlaceMemberCardDetail;
import com.quanyan.place.entity.vo.PlaceMemberTypeVo;
import com.quanyan.place.entity.vo.ReqPlaceMemberSearch;
import com.quanyan.place.service.ApiPlaceService;

import java.util.List;
import java.util.Map;

/**
 * Created by yangyun on 16-8-25.
 */
public interface PlaceMemberWrapper {

    /**
     * 添加会员卡类型
     * @param reqMemberCardType
     * @return
     */
    APIResponse insertMemberType(ReqMemberCardType reqMemberCardType) throws Exception;

    APIResponse addMemberInfo(ReqMemberCard reqMemberCard,boolean isScanPay);

    APIResponse updateMemberCard(ReqMemberCard reqMemberCard);

    PageObj<List<RespMemberCardInfo>> getPlaceMemberCardList(ReqPlaceMemberSearch reqMemberSearch);

    APIResponse frozenMember(Integer memberUid, Integer adminUid);

    APIResponse logOffMemberCard(Integer memberCardId, Integer adminUid);

    APIResponse reportLossMemberCard(Integer memberCardId, Integer uid);

    APIResponse getMemberTypeByPlaceId(Integer placeId);

    APIResponse adjustMemberCardBalance(ReqAdjustMemberBalance reqAdjustMemberBalance);

    APIResponse importPlaceMembers(ReqMemberCards reqMemberCards);

    APIResponse getMemberCardId(Integer memberCardId);

    APIResponse importPlaceMembersBatch(ReqMemberCards reqMemberCards);


    APIResponse getPlaceMemberCardTypeList(Integer placeId);

    APIResponse getPlaceMemberCardDetail(String innerCardNo);

    APIResponse<?> cardRecharge(Map map, Integer cardID, Integer createUid, Integer adminPayType,  Double dAmount,
                                Double dGiveAmout, Integer numbers, String memo);

    APIResponse<?> cardRechargeForScanPay(Map map, Integer cardID, Integer createUid, Integer adminPayType,  Double dAmount,
                                Double dGiveAmout, Integer numbers, String memo);

    APIResponse<?> getVipPayDetail(Integer placeId, Integer cardTypeId);

    APIResponse<List<RespPlaceMemberCardDetail>> getMyVenueVipList(Integer userId);

    APIResponse<?> buyVenueVip(Integer userId, Integer cardTypeId, Integer payTypeId, Integer platformType,Integer refereesId, Integer larkAppId);

    APIResponse<?> cardRecharge(Integer cardID, Integer createUid, Integer adminPayType,  Double dAmount,
                                Double dGiveAmout, Integer numbers,String scanCode,String memo);

    APIResponse<?> vipCardPayRecordList(Integer userId, Integer pageNum, Integer pageSize);

    APIResponse<?> vipCardReChargeDetail(Integer userId, Integer cardTypeId, Integer payTypeId, Integer platformType,Integer refereesId);

    APIResponse<?> vipCardNoPayRecordList(String vipNo,Integer userId, Integer pageNum, Integer pageSize);

    APIResponse<?> orderCancelOperate(ReqOrderOperate reqOrderOperate);

    APIResponse<?> orderCompletePayOperate(ReqOrderOperate reqOrderOperate, TbBizPlaceOrder tbBizPlaceOrder);

    APIResponse orderUnsubscribeOperate(ReqOrderOperate reqOrderOperate, TbBizPlaceOrder tbBizPlaceOrder);

    APIResponse<?> orderCompleteUnsubscribeOperate(ReqOrderOperate reqOrderOperate, TbBizPlaceOrder tbBizPlaceOrder);

    APIResponse<?> orderCancleToUnsubscribeOperate(ReqOrderOperate reqOrderOperate, TbBizPlaceOrder tbBizPlaceOrder);

    @Deprecated
    APIResponse updatePlaceMemberInfo(ReqMemberCard reqMemberCard);

    /**
     * 修改会员手机号
     * @param reqMemberCard
     * @return
     */
    APIResponse updatePlaceMemberMobile(ReqMemberCard reqMemberCard);

    APIResponse<?> updateMemberTypeStatusById(Integer id, byte status);

    /**
     * 设置两个场馆会员共享
     * @param placeId
     * @param relatePlaceId
     * @return
     */
    APIResponse setPlaceShareMember(Integer placeId, Integer relatePlaceId);

    /**
     * 根据placeId查询互通会员场馆
     * @param placeId
     * @return
     */
    APIResponse getSharePlace(Integer placeId);

    APIResponse cancelPlaceShareMember(Integer relatePlaceId);

    /**
     * 查询会员类型列表
     * @param placeMemberTypeVo
     * @return
     */
    APIResponse queryMemberTypeListByConditions(PlaceMemberTypeVo placeMemberTypeVo);

    APIResponse<?> getPlaceMemberCardType(Integer placeId, Integer cardTypeId);
}
